package cn.iune.javax.mail;

import javax.mail.MessagingException;
import javax.mail.internet.AddressException;

public class MailService {
	
	final public static String FROM_MAIL = "postmaster@iune.cn";
	final public static String MAIL_USERNAME = "postmaster@iune.cn";
	final public static String MAIL_PASSWORD = "Msid1635335";
	
	public static void sendMail(String toMail, String mailTitle, String mailContent) {  
    	 try {
			SendingMail.sendHtml(FROM_MAIL, MAIL_USERNAME, MAIL_PASSWORD, toMail, mailTitle, mailContent);
		} catch (AddressException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (MessagingException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
     }  

}
